package org.jsola.hr.dao;

import org.apache.ibatis.annotations.Param;
import org.jsola.hr.dto.SalaryBasicAddDTO;
import org.jsola.hr.entity.SalaryBasicDO;
import org.jsola.hr.query.SalaryBasicQuery;
import org.jsola.hr.query.SalaryChangesQuery;
import org.jsola.hr.vo.SalaryBasicVO;
import org.jsola.hr.vo.SalaryChangesVO;
import org.jsola.orm.mapper.IJsolaMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 员工薪资表
 *
 * @author zhr
 */
@Repository("hrSalaryBasicDAO")
public interface ISalaryBasicDAO extends IJsolaMapper<SalaryBasicDO> {

    /**
     * 员工薪资档案列表
     *
     * @param salaryBasicAddDTO
     * @param siteId
     * @return
     */
    List<SalaryBasicVO> selectEmpInfoByCompanyId(@Param(value = "salaryBasicAddDTO") SalaryBasicQuery salaryBasicAddDTO
            , @Param(value = "siteId") String siteId);

    /**
     * 查询指定员工薪资档案列表
     *
     * @param companyId 公司Id
     * @param empIds    员工Id
     * @param siteId    站点Id
     * @return 员工薪资档案列表
     */
    List<SalaryBasicVO> selectByCompanyIdAndEmpIds(@Param(value = "companyId") String companyId
            , @Param(value = "empIds") List<String> empIds, @Param(value = "siteId") String siteId);

    /**
     * 员工定薪时查询员工基本信息
     *
     * @param id
     * @param siteId
     * @return
     */
    SalaryBasicVO selectEmpInfoByNumber(@Param(value = "id") String id, @Param(value = "siteId") String siteId);

    /**
     * 调薪保存
     *
     * @param salaryBasicAddDTO
     * @param siteId
     * @return
     */
    Integer updateSalaryBasic(@Param(value = "salaryBasicAddDTO") SalaryBasicAddDTO salaryBasicAddDTO, @Param(value = "siteId") String siteId);

    /**
     * 薪资详情
     *
     * @param salaryChangesQuery
     * @param siteId
     * @return
     */
    List<SalaryChangesVO> selectChanges(@Param(value = "salaryChangesQuery") SalaryChangesQuery salaryChangesQuery, @Param(value = "siteId") String siteId);

}

